package com.hackerrank.contests.quantium.challenges.koaneeye;

import java.util.Scanner;
import java.util.Stack;

public class Solution {
	public static void main(String[] args) {
		Stack<String> s = new Stack<String>();
		Scanner in = new Scanner(System.in);
		while(in.hasNext())
			s.push(in.nextLine());
		while(!s.empty()) {
			char c[] = s.pop().toCharArray();
			for(int i = c.length - 1; i >= 0; i--)
				System.out.print(c[i]);
			System.out.println();
		}
	}
}
